package com.example.spring.activemq.jms.vo;

import lombok.Data;
import lombok.ToString;

/**
 * 用于记录发送mq失败数据，mq默认重试3次，发送失败后，则丢弃
 *
 * @author wangsh
 * @date 2019/8/8 17:32
 * @Description
 */
@Data
@ToString
public class MQRestRstDta<T> {

    //重试次数
    private Integer count;

    //结果集合
    private T result;

    //仓库ID（动态绑定key用到）
    private String wareId;

    //消息id
    private String messageId;

    private MQRestRstDta() {
    }

    public static MQRestRstDta getInstance() {

        return new MQRestRstDta();
    }

    public MQRestRstDta(Integer count, T result) {
        this.count = count;
        this.result = result;
    }

    public MQRestRstDta(Integer count, String wareId,String messageId, T result) {
        this.count = count;
        this.wareId = wareId;
        this.result = result;
        this.messageId = messageId;
    }

    public MQRestRstDta(Integer count, T result, String messageId) {
        this.count = count;
        this.result = result;
        this.messageId = messageId;
    }


}
